<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewPatientTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.ViewPatientLabel_patientID}"/>
                    <h:outputText value="#{patientController.selected.patientID}" title="#{bundle.ViewPatientTitle_patientID}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_firstNameE}"/>
                    <h:outputText value="#{patientController.selected.firstNameE}" title="#{bundle.ViewPatientTitle_firstNameE}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_secondNameE}"/>
                    <h:outputText value="#{patientController.selected.secondNameE}" title="#{bundle.ViewPatientTitle_secondNameE}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_lastNameE}"/>
                    <h:outputText value="#{patientController.selected.lastNameE}" title="#{bundle.ViewPatientTitle_lastNameE}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_firstNameA}"/>
                    <h:outputText value="#{patientController.selected.firstNameA}" title="#{bundle.ViewPatientTitle_firstNameA}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_secondNameA}"/>
                    <h:outputText value="#{patientController.selected.secondNameA}" title="#{bundle.ViewPatientTitle_secondNameA}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_lastNameA}"/>
                    <h:outputText value="#{patientController.selected.lastNameA}" title="#{bundle.ViewPatientTitle_lastNameA}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_birthDate}"/>
                    <h:outputText value="#{patientController.selected.birthDate}" title="#{bundle.ViewPatientTitle_birthDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewPatientLabel_homeTele}"/>
                    <h:outputText value="#{patientController.selected.homeTele}" title="#{bundle.ViewPatientTitle_homeTele}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_homeTeleExt}"/>
                    <h:outputText value="#{patientController.selected.homeTeleExt}" title="#{bundle.ViewPatientTitle_homeTeleExt}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_workTele}"/>
                    <h:outputText value="#{patientController.selected.workTele}" title="#{bundle.ViewPatientTitle_workTele}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_workTeleExt}"/>
                    <h:outputText value="#{patientController.selected.workTeleExt}" title="#{bundle.ViewPatientTitle_workTeleExt}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_mobileNo}"/>
                    <h:outputText value="#{patientController.selected.mobileNo}" title="#{bundle.ViewPatientTitle_mobileNo}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_independentID}"/>
                    <h:outputText value="#{patientController.selected.independentID}" title="#{bundle.ViewPatientTitle_independentID}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_relationID}"/>
                    <h:outputText value="#{patientController.selected.relationID}" title="#{bundle.ViewPatientTitle_relationID}"/>
                    <h:outputText value="#{bundle.ViewPatientLabel_comapny}"/>
                    <h:outputText value="#{patientController.selected.comapny}" title="#{bundle.ViewPatientTitle_comapny}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{patientController.destroyAndView}" value="#{bundle.ViewPatientDestroyLink}"/>
                <br />
                <br />
                <h:commandLink action="Edit" value="#{bundle.ViewPatientEditLink}"/>
                <br />
                <h:commandLink action="#{patientController.prepareCreate}" value="#{bundle.ViewPatientCreateLink}" />
                <br />
                <h:commandLink action="#{patientController.prepareList}" value="#{bundle.ViewPatientShowAllLink}"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.ViewPatientIndexLink}" action="/index" immediate="true" />

            </h:form>
        </ui:define>
    </ui:composition>

</html>
